| Description | : **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier). Returns a route between an origin and a destination, passing through waypoints if they are specified. The route will take into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day. Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected. |
| Reference | : Link ¶ |
⚼ Request
POST:
/route/directions
{
api-version:
string
,
x-ms-client-id:
string
,
Accept-Language:
string
,
routeDirectionsRequest:
}
{
,
type:
enum
,
features:
[
]
,
{
,
type:
enum
,
geometry:
object
,
properties:
}
{
,
pointIndex:
integer
,
pointType:
enum
,
}
travelMode:
enum
,
departAt:
string
,
arriveAt:
string
,
optimizeRoute:
enum
,
optimizeWaypointOrder:
boolean
,
avoid:
[
,
string
,
]
routeOutputOptions:
[
,
string
,
]
maxRouteCount:
integer
,
vehicleSpec:
}
{
,
isVehicleCommercial:
boolean
,
heading:
integer
,
length:
number
,
width:
number
,
height:
number
,
weight:
integer
,
maxSpeed:
integer
,
axleCount:
integer
,
axleWeight:
integer
,
loadType:
enum
,
}
⚐ Response (200)
{
$schema:
object
,
}
⚐ Response (default)
{
$headers:
{
,
x-ms-error-code:
string
,
}
$schema:
}
{
,
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
innererror:
}
{
,
code:
string
,
innererror:
string
,
}